import { PRODUCT_TYPE_OPTIONS, STOCK_PROPERTIES } from '@/constants/commodity';

export const FORM_ITEMS = [
  {
    prop: 'categoryUuids',
    label: '品类',
    type: 'slot',
    slotName: 'category',
    defaultVal: [],
  },
  {
    prop: 'spuNo',
    label: 'SPU编码',
    type: 'input',
    searchType: 'EQ'
  },
  {
    prop: 'skuNo',
    label: 'SKU编码',
    type: 'input',
    searchType: 'EQ'
  },
  {
    prop: 'productType',
    label: '商品类型',
    type: 'select',
    options: PRODUCT_TYPE_OPTIONS,
    clearable: true,
    searchType: 'EQ'
  },
  {
    prop: 'brandName',
    label: '商品品牌',
    type: 'input',
  },
  {
    prop: 'productName',
    label: '商品名称',
    type: 'input',
  },
  {
    prop: 'specDetail',
    label: '规格',
    type: 'input',
  },
  {
    prop: 'logisticsStock',
    label: '存量属性',
    type: 'select',
    options: STOCK_PROPERTIES,
    clearable: true,
    searchType: 'EQ'
  },
  {
    prop: 'brandseries',
    label: '系列',
    type: 'input'
  },
  {
    prop: 'searchKeyword',
    label: '智能搜索关键词',
    type: 'input',
  }
]

export const TABLE_COLUMNS = [
  {
    title: '分类',
    key: 'categoryPath',
  },
  {
    title: 'SPU编码',
    key: 'spuNo',
  },
  {
    title: 'SKU编码',
    key: 'skuNo',
  },
  {
    title: '创建人',
    key: 'createOperName',
  },
  {
    title: '商品负责人',
    key: 'productDutyPersons',
  },
  {
    title: '商品名称',
    key: 'productName',
  },
  {
    title: '规格',
    key: 'specDetailStr',
  },
  {
    title: '主计量单位',
    key: 'mainUnitStr',
  },
  {
    title: '存量属性',
    key: 'logisticsStock',
  },
  {
    title: '商品类型',
    key: 'productTypeStr',
  },
  {
    title: '商品管理区域',
    key: 'manageArea',
  },
  {
    title: '创建时间',
    key: 'createOpeTime',
  },
  {
    title: '品牌',
    key: 'brandName',
  },
  {
    title: '系列',
    key: 'brandseries'
  }
]
